<?php
include "../DBConnect.php";
include "../funcoes.php";

if(isset($_REQUEST['id_agenda_item'])){
	$id_agenda_item = $_REQUEST['id_agenda_item'];
	
	if($id_agenda_item != 0){
		$strSQL = " DELETE FROM agenda_item WHERE id_agenda_item = " . $id_agenda_item;
	}else{
		$strSQL = " DELETE FROM agenda_item WHERE data = " . dataSQL($_REQUEST['data']);
	}
	
	execute($strSQL);
	
	echo 1;
}else{
	echo "Ocorreu um erro!";
}
?>